package com.agstar.designpatten.creational.prototype;

public class Test {
    public static void main(String[] args) throws CloneNotSupportedException {
        Sheep sheep = new Sheep();
        sheep.setColor("黑白相间");
        sheep.setName("多莉");
        for (int i = 0; i < 5; i++) {
            Sheep clone = sheep.clone();
            clone.setName(clone.getName() + i);
        }
    }
}
